{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "576c0ecf-9557-4cd0-b272-16352aefd882",
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "1~100中所有数的和为: 5050\n"
     ]
    }
   ],
   "source": [
    "i=0;sumAll=0\n",
    "while(i<=100):\n",
    "    sumAll+=i\n",
    "    i+=1\n",
    "print(\"1~100中所有数的和为:\", sumAll)\n",
    "input()\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "d87e3aae-cb0d-4f09-bea6-887da488c9a2",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.11.9"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
